<template>
	<view>
		<dsl-navbar title="谁看过我" bgTopImg="white" isBack></dsl-navbar>
		<view class="rowsb align-center padding animation-scale-up" 
		v-for="(item,index) in browsingList" :key="index" hover-class="bg-gray" @click="$tools.push('/pages/user/modules/userInfo?id='+item.id)">
			<view class="align-center">
				<image :src="item.userAvatar" mode="aspectFill"></image>
				<view class="margin-left one_overflow" style="width: 400rpx;">{{item.userName}}</view>
			</view>
			<view class="cuIcon-right"></view>
		</view>

	</view>
</template>
<script>
	import {
		mapState,
		mapActions
	} from 'vuex'
	export default {
		data() {
			return {
				pageNum:1
			}
		},
		//生命周期函数
		onReady() {},
		onLoad() {
			this.getbrowsingHistory({
				pageNum: 1, //第一页
				pageSize: 20
			}) //谁看过我
		},
		onShow() {},
		methods: {
			onReachBottom(e) {
				this.pageNum++
				this.getbrowsingHistory({
					pageNum: this.pageNum, //第一页
					pageSize: 10
				}) //谁看过我
			},
			/**
			 *  getbrowsingHistory 查看谁看过我
			 */
			...mapActions('message', ['getbrowsingHistory']),
			//他人首页跳转
			chatHome() {
				uni.navigateTo({
					url: '/pages/message/userHome/index'
				})
			},

		},
		computed: {
			...mapState('message', ['browsingList']),

		},
		components: {

		}
	}
</script>

<style>
	image {
		height: 88rpx;
		width: 88rpx;
		border-radius: 99rpx;
	}
</style>
